namespace Td {
 class Person {

    // 私有属性
    private readonly name: string;

    // 只读属性
    readonly age: number;
    // 构造函数
    constructor(name: string, age: number) {
        this.name = name;
        this.age = age;
        }
    // 方法
    sayHello() {
        console.log(`Hello, my name is ${this.name} and I am ${this.age} years old.`);
    }
 }
}



